
{{> header }}

<h1>{{employee.name}} {{employee.lastname}}'s details {{#with employee }}{{#unless this.is_active}}<span class="badge alert-warning">Deactivated</span>{{/unless}}{{/with}}</h1>

<div class="row">
    <div class="col-md-3 lead">Employee details</div>
    <form id="add_new_user_frm" method="post" action="/users/delete/{{employee.id}}/" onsubmit="return confirm('Do you really want to delete the user {{employee.name}} {{employee.lastname}}?');">
        <div class="col-md-1 col-md-offset-8">
        <button id="remove_btn" type="submit" class="pull-right btn btn-danger single-click" data-toggle="tooltip" data-placement="top" title="Remove employee"><i class="fa fa-trash"></i> Delete</button>
        </div>
    </form>
</div>

<div class="row">&nbsp;</div>

{{> show_flash_messages }}

<div class="col-md-3 list-group">
  <a href="/users/edit/{{employee.id}}/" class="list-group-item{{# if show_main_tab }} selected-item{{/if}}">General details</a>
  <a href="/users/edit/{{employee.id}}/schedule/" class="list-group-item {{# if show_schedule_tab }} selected-item{{/if}}">Schedule</a>
  <a href="/users/edit/{{employee.id}}/calendar/" class="list-group-item {{# if show_calendar_tab }} selected-item{{/if}}">Calendar</a>
  <a href="/users/edit/{{employee.id}}/absences/" class="list-group-item{{# if show_absence_tab }} selected-item{{/if}}">Absences</a>
</div>

{{# if show_absence_tab }}

  {{> user_details/absences }}

{{else if show_schedule_tab}}

  {{> user_details/schedule }}

{{else if show_calendar_tab}}

  {{> user_details/calendar }}

{{else}}

  {{> user_details/general }}

{{/ if}}

<div class="row">&nbsp;</div>

{{> footer }}
